﻿<Page x:Class="BeautySalon.Pages.AddServicePage"
      xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
      xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
      xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
      xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
      xmlns:local="clr-namespace:BeautySalon.Pages"
      mc:Ignorable="d" 
      d:DesignHeight="450" d:DesignWidth="800"
      Title="AddServicePage">

    <Grid Background="White">
        
        <Grid.RowDefinitions>
            <RowDefinition Height="60"/>
            <RowDefinition Height="60"/>
            <RowDefinition Height="60"/>
            <RowDefinition Height="60"/>
            <RowDefinition Height="60"/>
            <RowDefinition Height="60"/>
        </Grid.RowDefinitions>

        <Grid.ColumnDefinitions>
            <ColumnDefinition Width="300"/>
            <ColumnDefinition Width="*"/>
        </Grid.ColumnDefinitions>

        <!--TextBlock'и-->
        <TextBlock Text="Название"
                   Width="133"
                   Height="30"
                   TextAlignment="Center"
                   VerticalAlignment="Center"
                   HorizontalAlignment="Center"
                   FontFamily="Tahoma"
                   FontSize="19"/>

        <TextBlock Text="Длительность"
                   Grid.Row="1"
                   Width="133"
                   Height="30"
                   TextAlignment="Center"
                   VerticalAlignment="Center"
                   HorizontalAlignment="Center"
                   FontFamily="Tahoma"
                   FontSize="19"/>

        <TextBlock Text="Стоимость"
                   Grid.Row="2"
                   Width="133"
                   Height="30"
                   TextAlignment="Center"
                   VerticalAlignment="Center"
                   HorizontalAlignment="Center"
                   FontFamily="Tahoma"
                   FontSize="19"/>

        <TextBlock Text="Скидка"
                   Grid.Row="3"
                   Width="133"
                   Height="30"
                   TextAlignment="Center"
                   VerticalAlignment="Center"
                   HorizontalAlignment="Center"
                   FontFamily="Tahoma"
                   FontSize="19"/>

        <TextBlock Text="Фото"
                   Grid.Row="4"
                   Width="133"
                   Height="30"
                   TextAlignment="Center"
                   VerticalAlignment="Center"
                   HorizontalAlignment="Center"
                   FontFamily="Tahoma"
                   FontSize="19"/>
        
        <!--TextBox'и-->
        <TextBox Name="TitleTxb"
                 Text="{Binding Title}"
                 Grid.Column="1"
                 MaxLength="100"
                 Width="300"
                 Height="50"
                 HorizontalAlignment="Left"/>

        <TextBox Name="DurationTxb"
                 Text="{Binding DurationInSeconds}"
                 Grid.Column="1"
                 Grid.Row="1"
                 MaxLength="5"
                 Width="300"
                 Height="50"
                 HorizontalAlignment="Left" KeyDown="DurationTxb_KeyDown"/>

        <TextBox Name="CostTxb"
                 Text="{Binding Cost}"
                 Grid.Column="1"
                 Grid.Row="2"
                 MaxLength="8"
                 Width="300"
                 Height="50"
                 HorizontalAlignment="Left" KeyDown="CostTxb_KeyDown"/>

        <TextBox Name="DiscountTxb"
                 Text="{Binding Discount}"
                 Grid.Column="1"
                 Grid.Row="3"
                 MaxLength="8"
                 Width="300"
                 Height="50"
                 HorizontalAlignment="Left"/>

        <TextBox Name="ImageTxb"
                 Text="{Binding MainImagePath}"
                 Grid.Column="1"
                 Grid.Row="4"
                 MaxLength="1000"
                 Width="300"
                 Height="50"
                 HorizontalAlignment="Left"/>
        
        <!--Buttons-->
        <Button Name="ChangeImageBtn"
                Grid.Column="1"
                Grid.Row="4"
                Width="150"
                Height="35"
                HorizontalAlignment="Right"
                Content="Выбрать фото"
                FontSize="20"
                Margin="0 0 25 0"
                Click="ChangeImageBtn_Click"/>

        <Button Name="SaveNewRecordBtn"
                Grid.Column="1"
                Grid.Row="5"
                Width="150"
                Height="35"
                HorizontalAlignment="Right"
                Content="Сохранить"
                FontSize="20"
                Margin="0 0 25 0"
                Click="SaveNewRecordBtn_Click"/>

        <Button Name="BackBtn"
                Grid.Column="1"
                Grid.Row="5"
                Width="150"
                Height="35"
                HorizontalAlignment="Left"
                Content="Назад"
                FontSize="20"
                Margin="20 0 0 0"
                Click="BackBtn_Click"/>

        <ComboBox Name="namesCmbx"
                  SelectedItem="{Binding Client}"
                  Grid.Row="5"
                  Height="40"
                  Width="200"/>

    </Grid>
</Page>
